package py.com.erpone.session.dm.list;

import java.util.List;

import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.inject.Named;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import py.com.erpone.entity.dm.Inventario;



@Stateless
@LocalBean
@Named
public class InventarioList {

	@PersistenceContext
	private EntityManager em;


	@SuppressWarnings("unchecked")
	public List<Inventario> findAll(){
		List<Inventario> result=(List<Inventario>)em.createNamedQuery("inventario.all").getResultList();
		return result;
	}

	public Inventario findById(Long id){
		return em.find(Inventario.class, id);
	}

}
